package com.dubbo.utils;

public final class ArrayUtils {

    private ArrayUtils() {
    }

    public static boolean contains(Object[] array, Object value) {
        if (array == null) {
            return false;
        }

        if (value == null) {
            return false;
        }

        for (Object o : array) {
            if (value.equals(o)) {
                return true;
            }
        }

        return false;
    }


    public static boolean isEmpty(Object[] objects) {
        if (objects == null) {
            return true;
        }

        if (objects.length == 0) {
            return true;
        }

        return false;
    }
}
